﻿using System;
using System.Windows.Forms;
using PomodoroSuite.FW.Comun.Caching;
using System.Threading;
using System.Configuration;
using System.Globalization;
using PomodoroSuite.EntidadesNegocio;

namespace PomodoroSuite.FrontEnd.Win
{
    static class Program
    {
        /// <summary>
        /// Usuario activo del sistema
        /// </summary>
        public static Usuario UsuarioActivo { get; set; }

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            CultureInfo cultura = new CultureInfo(ConfigurationManager.AppSettings["Idioma"]);
            Thread.CurrentThread.CurrentCulture = cultura;
            Thread.CurrentThread.CurrentUICulture = cultura;
            new frmLogin().ShowDialog();
            if (UsuarioActivo != null)
                Application.Run(new Shell());
        }
    }
}
